package com.spring;

import com.sun.istack.internal.Nullable;

/**
 * 为开发者提供一个机会：对Spring容器即将创建的Bean进行修改
 *
 * @author xzy
 * @date 2021/11/413:32
 */
public interface BeanPostProcessor {

    @Nullable
    default Object postProcessBeforeInitialization(Object bean, String beanName) throws Exception {
        return bean;
    }

    @Nullable
    default Object postProcessAfterInitialization(Object bean, String beanName) throws Exception {
        return bean;
    }
}
